package com.nuc.bigdata.feign;

import com.nuc.bigdata.feign.entity.PictureFeign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 调用oa-picture服务的客户端
 * @author JackLuo
 * @date 2019/11/18
 */
@FeignClient(name = "oa-picture")
public interface PictureServiceFeign {

    /**
     * 根据指定图片唯一标识获取图片信息feign
     * @param pictureId 图片唯一标识
     * @return 图片信息feign
     */
    @GetMapping("/oa-picture/{pictureId}")
    PictureFeign getPicture(@PathVariable("pictureId")String pictureId);

    /**
     * 根据指定图片唯一标识获取图片的url地址
     * @param pictureId 图片唯一标识
     * @return 图片的url地址
     */
    @GetMapping("/oa-picture/url/{pictureId}")
    String getPictureUrl(@PathVariable("pictureId")String pictureId);

    /**
     * 根据指定图片id查询对应图片的缩略图url地址
     * @param pictureId 图片唯一标识
     * @return 图片缩略图url地址
     */
    @GetMapping("/oa-picture/thumbnailUrl/{pictureId}")
    String getThumbnailUrl(@PathVariable("pictureId")String pictureId);
}
